<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>对象</title>
</head>
<body>
    <script>
        var obj = {
            name:"cq",
            age:"18",
            height:1.88
        }

       for(key in obj)
       {
          console.log(obj[key]);
       }

       var keyof = Object.keys(obj);
       for(var i = 0;i<keyof.length;i++)
       {
           var key = keyof[i];
           console.log(obj[key]);
       }

    </script>
</body>
</html>